Update Tool Tutorial
Used to update the tutorial and documentation for a tool. This allows you to provide guidance, examples, and instructions to help users understand how to effectively use the tool.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/tools/tutorial/{tool_id} |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/tools/tutorial/{tool_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tutorial": "# Customer API Tutorial\n\n## Getting Started\n\nThis API provides access to customer data...",
"documentation_url": "https://docs.example.com/customer-api",
"examples": {
"get_customer": "To retrieve a customer, call the get_customer action with the customer ID...",
"create_customer": "To create a new customer, provide the required fields: name, email, and phone..."
}
}'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tool_id | string | Yes | The unique identifier of the tool. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
| Content-Type | application/json | Yes | Data type, must be application/json. |
Request Body
Request Body Schema
{
"tutorial": "string",
"documentation_url": "string",
"examples": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
Request Body Parameters
The request body is flexible and can include various documentation fields. Common fields include:
| Field | Type | Required | Description |
|---|---|---|---|
| tutorial | string | No | Main tutorial content (supports Markdown formatting). |
| documentation_url | string | No | URL to external documentation. |
| examples | object | No | Dictionary of usage examples keyed by action name. |
| quick_start | string | No | Quick start guide for getting started quickly. |
| best_practices | string | No | Best practices and recommendations. |
| troubleshooting | string | No | Common issues and solutions. |
| faq | string | No | Frequently asked questions and answers. |
note
Tutorial Content Guidelines
- Use Markdown formatting for rich text content
- Include code examples with proper syntax highlighting
- Organize content with clear headings and sections
- Provide step-by-step instructions where applicable
- Include screenshots or diagrams when helpful (as links)
- Keep language clear and accessible
tip
Best practices for tool tutorials:
- Start with a brief overview of what the tool does
- Include a quick start section for immediate use
- Provide examples for each major action
- Document authentication requirements
- Explain common use cases and workflows
- Include troubleshooting tips for common issues
- Link to external documentation for more details
- Update tutorials when tool functionality changes
Effective tutorials include:
- Clear prerequisites and setup instructions
- Step-by-step guides for common tasks
- Code examples with explanations
- Expected input and output formats
- Error handling examples
- Performance considerations
- Security best practices
Response
Success Response (200 OK)
Returns an object containing the update status.
{
"is_success": true,
"item_id": "tool_123",
"detail": "Tool tutorial updated successfully",
"error": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| is_success | boolean | Indicates whether the update was successful. |
| item_id | string | The identifier of the tool. |
| detail | string | Success or failure message with additional context. |
| error | object | Error details if the operation failed (empty if successful). |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request body is invalid.
{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "tool not found",
"type": "value_error.notfound"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., body field). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid tutorial content | Bad Request |
| 404 | Not Found - Tool does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |